package com.hisan.freeride.home.adapter;


import com.github.library.BaseQuickAdapter;
import com.github.library.BaseViewHolder;
import com.hisan.freeride.R;
import com.hisan.freeride.home.model.Loveprice;


import java.util.List;

/**
 * Created by yu on 2017/1/17.
 */

public class PriceAdapter extends BaseQuickAdapter<Loveprice.ListBean, BaseViewHolder> {
    private String action;

    public PriceAdapter(List<Loveprice.ListBean> data) {
        super(R.layout.price_item,data);
    }

    @Override
    protected void convert(BaseViewHolder holder, Loveprice.ListBean water) {
        holder.setText(R.id.name,water.getContent());
        holder.setText(R.id.time,water.getCreate_time());
        if (water.getAction()==1){
            action="+";
        }else if (water.getAction()==2){
            action="-";
        }
        holder.setText(R.id.status,action+water.getNumber()+"");
    }
}
